﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using mitasoft.Component.Models.Blog;
using System.Data;
using mitasoft.Component.Models;

namespace mitasoft.Component.Services.Interfaces
{

    public interface IBlogService
    {

        CategoryInfo AddCategory(string title);
        CategoryInfo AddCategory(string title, IDbTransaction transaction);

        CategoryInfo[] GetCategories();
        IEnumerable<CategoryTag> RetriveCategoryTags();

        PostInfo NewPost(string title, string description, DateTime createdDate, bool publish, IEnumerable<string> categories);
        PostInfo UpdatePost(int id, string title, string description, DateTime createdDate, bool publish, IEnumerable<string> categories);

        PostInfo GetPost(int id, IDbTransaction transaction);
        PostInfo GetPost(int id);

        PostInfo[] GetPosts(IDbTransaction transaction);
        PostInfo[] GetPosts();

        PagedData<PostInfo> GetRecentPostPaginated(int skip, int take);
    }
}
